{% extends "base.html" %}
{% load django_markdown %}
{% block content %}
	<div class="posts">
		{% for post in post_list %}
			<section class="post">
			 <header class="post-header">
				<h2 class="post-title ">
					<a href="{% url 'detail' id=post.id %}">{{post.title}}</a>
				</h2>
				 <p class="post-meta">
                     Time:  <a class="post-author" href="#">{{ post.date_time |date:'Y M d'}}</a>
                     {% for category in post.categories.all %}
                      <a class="post-category post-category-js" href="{{category.get_absolute_url}}">{{ category.name}}</a>
                      {% if not forloop.last %}, {% endif %}
					{% endfor %}
                  </p>
			</header>
			 <div class="post-description">
                    <p>
                        {{ post.content|markdown|truncatewords_html:10}}
                    </p>
              </div>
               <a class="pure-button" href="{% url 'detail' id=post.id %}">Read More >>> </a>
			</section>
		
		{% endfor %}
	
	</div>
{% endblock %}